package com.company.作业;
import java.util.Scanner;

    public class Main {

        public static void main(String[] args) {
            // write your code here;
            System.out.println("请输入年份：");
            Scanner in=new Scanner(System.in);
            int year=in.nextInt();
            if((year/1000<=1)||(year/1000>=10)){
                System.out.println("输入年份错误");
            }
            else if((year/1000>=1)&&(year/1000<= 10)&&((year%4!=0)||(year%400!=0)&&(year%100!=0))){
                System.out.println("输入年份正确"+"\n"+year+"是平年");
            }
            else if((year/1000>=1)&&(year/1000<10)&&(year%4==0)||((year%400==0)&&(year%100==0))){
                System.out.println("输入年份正确"+"\n"+year+"是闰年") ;
            }
            else{
                System.out.println("程序结束！");
            }

        }
    }




